<PRE>
<?php
$filename="aaa.html";
$re1='((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(?![\\d])';	# IPv4 IP Address 1
$re2='(.)';	# Any Single Character 1
$re3='(\\d+)';

$fd = fopen($filename, "r");
$bufer = fread($fd, filesize($filename));
fclose($fd);
$bufer = split("\n", $bufer);
for($i = 0; $i < count($bufer); $i++) {
	$str = $bufer[$i];
	if((strpos($str, ":") != FALSE) && (strpos($str, ".") != FALSE)) {
		if($c=preg_match_all ("/".$re1.$re2.$re3."/is", $str, $matches)) {
			$ip = $matches[1][0];
      		$port=$matches[3][0];
			echo $ip.":".$port."\n";
		}
	}
}
?>
</PRE>
